/**
 *  Copyright 2009-2014 by WWW.KNET.CN  All rights reserved.
 */
package com.domain.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * TODO操作结果提示类
 * 
 * @author liujie
 * @date 2015年4月27日 下午3:00:46
 * 
 */
public enum TipEnum {
	SUCCESS("y", "操作成功"), FAIL("n", "操作失败"), LOGINOUT("o", "登录超时");
	private String code;
	private String msg;
    public static Map<String, Object> tipMap=new HashMap<String, Object>();
	TipEnum(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	public static Map<String, Object>  getTipMap(TipEnum tip){
		tipMap.put("code", tip.code);
		tipMap.put("msg", tip.msg);
		return tipMap;
	}
	public static void main(String[] args) {
		System.out.println(getTipMap(TipEnum.FAIL));
	}
}
